//
//  BML_CustomCell.m
//  22-HomeWork
//
//  Created by GivenBmli on 16/8/13.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "BML_CustomCell.h"
#import "ListModel.h"
#import "UIImageView+WebCache.h"
#import "PrefixHeader.pch"
@interface BML_CustomCell ()
@property (weak, nonatomic) IBOutlet UIImageView *imageHead;
@property (weak, nonatomic) IBOutlet UILabel *lableMvdesc;
@property (weak, nonatomic) IBOutlet UILabel *mvtitleAndSingmane;
@property (weak, nonatomic) IBOutlet UIImageView *imagePicurl;
@property (weak, nonatomic) IBOutlet UIImageView *imagePicurl2;
@property (weak, nonatomic) IBOutlet UIImageView *imagePicurl3;
@property (weak, nonatomic) IBOutlet UIImageView *imagePicurl4;



@property (weak, nonatomic) IBOutlet UILabel *mvtitleAndSingmane1;
@property (weak, nonatomic) IBOutlet UILabel *mvtitleAndSingmane2;
@property (weak, nonatomic) IBOutlet UILabel *mvtitleAndSingmane3;
@property (weak, nonatomic) IBOutlet UILabel *mvtitleAndSingmane4;

@property (weak, nonatomic) IBOutlet UILabel *lableMvdesc1;
@property (weak, nonatomic) IBOutlet UILabel *lableMvdesc2;
@property (weak, nonatomic) IBOutlet UILabel *lableMvdesc3;
@property (weak, nonatomic) IBOutlet UILabel *lableMvdesc4;


@end


@implementation BML_CustomCell

- (void)setArrDataSource:(NSMutableArray *)arrDataSource {
    _arrDataSource = arrDataSource;
    NSString *stringPicturl1 = [[_arrDataSource objectAtIndex:1] picurl];
    [self.imagePicurl sd_setImageWithURL:[NSURL URLWithString:stringPicturl1] placeholderImage:[UIImage new]];
    NSString *stringPicturl2 = [[_arrDataSource objectAtIndex:2] picurl];
    [self.imagePicurl2 sd_setImageWithURL:[NSURL URLWithString:stringPicturl2] placeholderImage:[UIImage new]];
    NSString *stringPicturl3 = [[_arrDataSource objectAtIndex:3] picurl];
    [self.imagePicurl3 sd_setImageWithURL:[NSURL URLWithString:stringPicturl3] placeholderImage:[UIImage new]];
    NSString *stringPicturl4 = [[_arrDataSource objectAtIndex:4] picurl];
    [self.imagePicurl4 sd_setImageWithURL:[NSURL URLWithString:stringPicturl4] placeholderImage:[UIImage new]];
    
    self.lableMvdesc1.text = [[_arrDataSource objectAtIndex:1] mvdesc];
    self.lableMvdesc2.text = [[_arrDataSource objectAtIndex:2] mvdesc];
    self.lableMvdesc3.text = [[_arrDataSource objectAtIndex:3] mvdesc];
    self.lableMvdesc4.text = [[_arrDataSource objectAtIndex:4] mvdesc];
    NSString *stringMvtitle1 = [[_arrDataSource objectAtIndex:1] mvtitle];
    NSString *stringSingName1 = [[_arrDataSource objectAtIndex:1] singername];
    self.mvtitleAndSingmane1.text = [NSString stringWithFormat:@"%@ - %@", stringMvtitle1, stringSingName1];
    
    NSString *stringMvtitle2 = [[_arrDataSource objectAtIndex:2] mvtitle];
    NSString *stringSingName2 = [[_arrDataSource objectAtIndex:2] singername];
    self.mvtitleAndSingmane2.text = [NSString stringWithFormat:@"%@ - %@", stringMvtitle2, stringSingName2];
    
    NSString *stringMvtitle3 = [[_arrDataSource objectAtIndex:3] mvtitle];
    NSString *stringSingName3 = [[_arrDataSource objectAtIndex:3] singername];
    self.mvtitleAndSingmane3.text = [NSString stringWithFormat:@"%@ - %@", stringMvtitle3, stringSingName3];
    
    
    NSString *stringMvtitle4 = [[_arrDataSource objectAtIndex:4] mvtitle];
    NSString *stringSingName4 = [[_arrDataSource objectAtIndex:4] singername];
    self.mvtitleAndSingmane4.text = [NSString stringWithFormat:@"%@ - %@", stringMvtitle4, stringSingName4];
}

- (void)setMvlistModel:(MvlistModle *)mvlistModel {
    _mvlistModel = mvlistModel;
    self.mvtitleAndSingmane.text = [NSString stringWithFormat:@"%@ - %@", mvlistModel.mvtitle, mvlistModel.singername];
    self.lableMvdesc.text = mvlistModel.mvdesc;
    [self.imageHead sd_setImageWithURL:[NSURL URLWithString:mvlistModel.picurl] placeholderImage:[UIImage new]];
}

@end
